import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';

class HomeBanner extends StatelessWidget {
const HomeBanner({super.key, required this.bannerList});
final List bannerList;
@override
  Widget build(BuildContext context) {
    return CarouselSlider(
      items:bannerList.map((item){
        return GestureDetector(
          onTap: () {},
          child: Container(
            margin: const EdgeInsets.all(10),
            child: Image.network(item['imUrl']),
          ),
        );
      }).toList(),
  options: CarouselOptions(
    height: 200,
    autoPlayInterval: const Duration(seconds: 3),
    autoPlay: true,
  ),
    );
  }

}